package com.maoye.ossp.sys.org.controller;

import java.io.PrintWriter;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.maoye.ossp.sys.org.service.IUserInfoService;

@Controller
@RequestMapping(value = "/sys/org")
public class UserInfoController {
	@Resource
	private IUserInfoService userInfoService;
	@RequestMapping(value = "/updatePassword")
	public void updatePassword(HttpServletRequest request,HttpServletResponse response) throws Exception
	{ 
		    String oldPassword = request.getParameter("oldPassword");
		    String newPassword = request.getParameter("newPassword");
		    String returnVal= userInfoService.updateAccountPassword(oldPassword, newPassword);
		   	response.setCharacterEncoding("utf-8");
			response.setContentType("text/plain");
			PrintWriter out = response.getWriter();
			out.write(returnVal);
	}
}